#include "car.h"

static car* car_ctor(car* self);
static car* car_dtor(car* self);

static klass_info local_car_klass = 
{
	NULL,
	"car_klass",
	sizeof(car),
	car_ctor,
	car_dtor,
};
klass_info* car_klass = &local_car_klass;

static car* car_ctor(car* self)
{
	memset(self->logo, 0x00, sizeof(self->logo));
	self->color = 0;
}

static car* car_dtor(car* self)
{
	return self;
}

char* car_get_logo(car* self)
{
	return self->logo;
}

void car_set_logo(car* self, char* logo)
{
	strncpy(self->logo, logo, sizeof(self->logo));
}

int car_get_color(car* self)
{
	return self->color;
}

void car_set_color(car* self, int color)
{
	self->color = color;
}
